package org.jeecg.modules.stoneentry.service.impl;

import java.util.List;
import java.util.Map;

import org.jeecg.modules.stoneentry.entity.StoneEntry;
import org.jeecg.modules.stoneentry.mapper.StoneEntryMapper;
import org.jeecg.modules.stoneentry.service.IStoneEntryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * @Description:  石出入库
 * @Author: jerryzhu
 * @Date:   2021-11-15
 * @Version: V1.0
 */
@Service
public class StoneEntryServiceImpl extends ServiceImpl<StoneEntryMapper, StoneEntry> implements IStoneEntryService {
	
	@Autowired
	StoneEntryMapper stoneEntryMapper;
	
	/**
	 * 查询金出入库明细分页
	 */
	@Override
	public IPage<StoneEntry> selectStoneEntryPage(Page<StoneEntry> page, QueryWrapper<StoneEntry> queryWrapper) {
		return stoneEntryMapper.selectStoneEntryPage(page, queryWrapper);
	}

	/**
	 * 查询仓库库存数据列表，不分页*
	 */
	@Override
	public List<StoneEntry> getStoneEntryStorageSummaryList(String storgeId) {
		return stoneEntryMapper.getStoneEntryStorageSummaryList(storgeId);
	}
	
	/**
	 * 查询员工库存数据列表，不分页*
	 */
	@Override
	public List<StoneEntry> getStoneEntryPersonSummaryList(String userName) {
		return stoneEntryMapper.getStoneEntryPersonSummaryList(userName);
	}

	/**获取仓库名字*/
	@Override
	public String getStorageName(String id) {
		return stoneEntryMapper.getStorageName(id);
	}

	/**通过石卡号获取石卡信息*/
	@Override
	public Map<String, String> queryStoneCardInfoByCodeNum(String codeNum) {
		return stoneEntryMapper.queryStoneCardInfoByCodeNum(codeNum);
	}
	
	/**通过石号获取石号信息*/
	@Override
	public Map<String, String> queryStoneStyleByStoneNum(String stoneNum) {
		return stoneEntryMapper.queryStoneStyleByStoneNum(stoneNum);
	}
	
}
